package com.springcloud.order.modular.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.springcloud.commom.page.PageResult;
import com.springcloud.order.entity.Order;
import com.springcloud.order.param.OrderParam;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * service接口
 *
 * @author hzl
 * @date 2024-07-30 15:48:28
 */
public interface OrderService extends IService<Order> {

    /**
     * 查询
     *
     * @author hzl
     * @date 2024-07-30 15:48:28
     */
    PageResult<Order> page(OrderParam orderParam);

    /**
     * 列表
     *
     * @author hzl
     * @date 2024-07-30 15:48:28
     */
    List<Order> list(OrderParam orderParam);

    /**
     * 添加
     *
     * @author hzl
     * @date 2024-07-30 15:48:28
     */
    void add(OrderParam orderParam);

    /**
     * 删除
     *
     * @author hzl
     * @date 2024-07-30 15:48:28
     */
    void delete(OrderParam orderParam);

    /**
     * 编辑
     *
     * @author hzl
     * @date 2024-07-30 15:48:28
     */
    void edit(OrderParam orderParam);

    /**
     * 查看
     *
     * @author hzl
     * @date 2024-07-30 15:48:28
     */
    Order detail(OrderParam orderParam);

    /**
     * 购买商品
     * @param pid
     * @param num
     */
    void buyProduct(String pid, Integer num);
}
